package com.demo.demothread;

/**
 * @PackageName com.demo.demothread
 * @Description 线程创建测试
 * @Author WK
 * @CreateTime 2023/3/13 9:32
 */
public class createThreadTest extends Thread{
    private String name;
    public createThreadTest(String name){
        this.name=name;
    }

    @Override
    public void run(){
        System.out.println(name);
    }

    public static void main(String[] args) {
        //调用方法级别
        new createThreadTest("张阿帆").run();
        //调用线程级别
        new createThreadTest("马阿星").start();
    }
}
